package com.kuaiditu.assistant.api.zzt_api;

import com.kuaiditu.assistant.api.zzt_api.base.BaseZTResponse;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;

/**
 * Created by Eenie on 2017/8/14.
 * Email: eeniework@gmail.com
 * Des:
 */

public interface ZZTService {
    @Headers({"Content-Type:application/x-www-form-urlencoded; charset=utf-8"})
    @POST("appInterface")
    Observable<ResponseBody> ReqData(@Header("X-Token") String token, @Header("X-OpenId") String OpenId, @Body RequestBody paramRequestBody);



    @Headers({"Content-Type:application/x-www-form-urlencoded; charset=utf-8"})
    @POST("appInterface")
    @FormUrlEncoded
    Observable<BaseZTResponse> fetchData(@Header("X-Token") String token, @Header("X-OpenId") String OpenId, @FieldMap Map<String,String> params);


    @GET()
    Observable<ResponseBody> refreshToken(@Url String url, @QueryMap Map<String,String> params);



}
